import java.util.Random;

/**
 * @author zhu
 * @date 2024-03-18
 */
public class PrintColorRGB extends Thread {
    public String color;
    public PrintColorRGB(String color){
        this.color = color;
    }

    @Override
    public void run() {
        Random random = new Random();
        int value = random.nextInt(256);
        System.out.println(color + ":" + value);
    }

    public static void main(String[] args) {
        PrintColorRGB p1 = new PrintColorRGB("red");
        PrintColorRGB p2 = new PrintColorRGB("green");
        PrintColorRGB p3 = new PrintColorRGB("blue");

        p1.start();
        p2.start();
        p3.start();
    }
}
